How to solve using the square root method